<?php wp_nonce_field('update', 'shoppse_subscribers_admin'); ?>

<div class="tablenav top">

	<div class="left">
		<label for="action-extend"><?php _e('Extend by', 'Shopp'); ?></label>
		<select name="action-extend">
			<option value="1-week"><?php _e('1 week', 'Shopp'); ?></option>
			<option value="1-month"><?php _e('1 month', 'Shopp'); ?></option>
			<option value="6-months"><?php _e('6 months', 'Shopp'); ?></option>
			<option value="1-year"><?php _e('1 year', 'Shopp'); ?></option>
			<option value="2-years"><?php _e('2 years', 'Shopp'); ?></option>
			<option value="5-years"><?php _e('5 years', 'Shopp'); ?></option>
			<option value="10-years"><?php _e('10 years', 'Shopp'); ?></option>
		</select>
		<input type="submit" name="do-extend" value="<?php _e('Update', 'Shopp'); ?>" class="button-secondary action" />
	</div>
	
	<div class="right">
		<label for="action-remove"><?php _e('Remove subscriber', 'Shopp'); ?></label>
		<select name="action-remove">
			<option value="temp"><?php _e('Temporary suspension', 'Shopp'); ?></option>
			<option value="perm"><?php _e('Permanently', 'Shopp'); ?></option>
		</select>
		<input type="submit" name="do-remove" value="<?php _e('Update', 'Shopp'); ?>" class="button-secondary action" />
	</div>
	
</div>

<table class="wp-list-table widefat fixed">
	<thead>
		<tr> 
			<th scope="col" class="check-column"> <input type="checkbox" /> </th>
			<th scope="col"><?php _e('User', 'Shopp'); ?></th>
			<th scope="col"><?php _e('Email', 'Shopp'); ?></th>
			<th scope="col"><?php _e('Subscription expiry', 'Shopp'); ?></th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<th scope="col" class="check-column"> <input type="checkbox" /> </th>
			<th scope="col"><?php _e('User', 'Shopp'); ?></th>
			<th scope="col"><?php _e('Email', 'Shopp'); ?></th>
			<th scope="col"><?php _e('Subscription expiry', 'Shopp'); ?></th>
		</tr>
	</tfoot>
	<tbody>
		<?php foreach ($users as $user): ?>
		<tr>
			<th scope="row" class="check-column"><input type="checkbox" name="subscriber_id[]" value="<?php echo (int) $user->id; ?>" /></th>
			<td><?php echo esc_html($user->name); ?></td>
			<td><?php echo esc_html($user->email); ?></td>
			<td><?php echo esc_html($user->expiry); ?></td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>

<div class="tablenav bottom">

	<div class="left">
		<label for="action-pagejump"><?php _e('View page', 'Shopp'); ?></label>
		<select name="action-pagejump">
			<option value="1">1</option>
			<option value="2">2</option>
			<option value="3">3</option>
		</select>
		<input type="submit" name="do-pagejump" value="<?php _e('Go', 'Shopp'); ?>" class="button-secondary action" />
	</div>
	
	<div class="right">
		<label for="action-perpage"><?php _e('Results per page', 'Shopp'); ?></label>
		<select name="action-perpage">
			<option value="10">10</option>
			<option value="20">20</option>
			<option value="50">50</option>
			<option value="100">100</option>
			<option value="200">200</option>
		</select>
		<input type="submit" name="do-perpage" value="<?php _e('Change', 'Shopp'); ?>" class="button-secondary action" />
	</div>
	
</div>